Optimal. Leaf size=112 \[ -\frac{(n+2) (a \sec (c+d x)+a)^n \text{Hypergeometric2F1}\left (1,n,n+1,\frac{1}{2} (\sec (c+d x)+1)\right )}{8 d n}-\frac{a (2-n) (a \sec (c+d x)+a)^{n-1}}{4 d (1-n)}+\frac{a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0968238, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3873, 89, 79, 68} \[ -\frac{(n+2) (a \sec (c+d x)+a)^n \, _2F_1\left (1,n;n+1;\frac{1}{2} (\sec (c+d x)+1)\right )}{8 d n}-\frac{a (2-n) (a \sec (c+d x)+a)^{n-1}}{4 d (1-n)}+\frac{a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3873
Rule 89
Rule 79
Rule 68
Rubi steps
\begin{align*} \int \csc ^3(c+d x) (a+a \sec (c+d x))^n \, dx &=-\frac{a^4 \operatorname{Subst}\left (\int \frac{x^2 (a-a x)^{-2+n}}{(-a-a x)^2} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac{a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}+\frac{\operatorname{Subst}\left (\int \frac{(a-a x)^{-2+n} \left (-a^3 n+2 a^3 x\right )}{-a-a x} \, dx,x,-\sec (c+d x)\right )}{2 d}\\ &=-\frac{a (2-n) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac{a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac{\left (a^2 (2+n)\right ) \operatorname{Subst}\left (\int \frac{(a-a x)^{-1+n}}{-a-a x} \, dx,x,-\sec (c+d x)\right )}{4 d}\\ &=-\frac{a (2-n) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac{a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac{(2+n) \, _2F_1\left (1,n;1+n;\frac{1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^n}{8 d n}\\ \end{align*}
Mathematica [A] time = 1.68421, size = 123, normalized size = 1.1 \[ \frac{2^{n-4} (\sec (c+d x)+1)^{-n} (a (\sec (c+d x)+1))^n \left (\cos ^2\left (\frac{1}{2} (c+d x)\right ) \sec (c+d x)\right )^{n-1} \left (2 (n+2) \text{Hypergeometric2F1}\left (1,1-n,2-n,\cos (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right )\right )-\csc ^2\left (\frac{1}{2} (c+d x)\right ) (n \cos (c+d x)+n-2)\right )}{d (n-1)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.275, size = 0, normalized size = 0. \begin{align*} \int \left ( \csc \left ( dx+c \right ) \right ) ^{3} \left ( a+a\sec \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{3}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]